OUTDIR = ~/share/tftpdir/wifi
APP = wifi_deamon
DEMO = test
OBJS = deamon.o datparser.o

ARCH = arm-linux-
CC = $(ARCH)gcc

all: $(APP) $(DEMO)
ifneq ($(OUTDIR),)
	cp -raf $^ $(OUTDIR)
endif

$(APP): $(OBJS)
	$(CC) -Wall -o $@ $^

$(DEMO): test.o datparser.o
	$(CC) -Wall -o $@ $^

%.o: %.c
	$(CC) -Wall -c -o $@ $<
	
clean:
	rm -rf *.o $(APP) $(DEMO)
